package com.cwm.test;

import java.nio.ByteBuffer;
import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArrayList;

public class test2 {
    public static void main(String[] args) {

        CopyOnWriteArrayList list = new CopyOnWriteArrayList();
        list.add("sss");
        list.add("sss1");
        list.add("sss2");
        list.add("sss3");
        Iterator iterator =  list.iterator();
        while (iterator.hasNext()){
            list.remove(iterator.next());
        }
        System.out.println(list);
    }
}
